import type { AxiosResponse } from 'axios'
import request from '@/utils/request'

const serviceName = import.meta.env.VITE_APP_SREVICE_NAME_CITY_MANAGEMENT

/**
 * 重点工作接口
 */
class keyWorkServe {
  /**
   * 首页接口
   */
  focusWorkHome<T = any>(): Promise<AxiosResponse<T>> {
    return request({
      url: `${serviceName}/focus-work/home`,
      method: 'get'
    })
  }
  /**
   * 列表接口
   */
  focusWorkList<T = any>(map: any): Promise<AxiosResponse<T>> {
    return request({
      url: `${serviceName}/focus-work/list`,
      method: 'post',
      data: map
    })
  }
  /**
   * 详情接口
   */
  focusWorkInfo<T = any>(id: string): Promise<AxiosResponse<T>> {
    return request({
      url: `${serviceName}/focus-work/info`,
      method: 'get',
      params: {
        id: id
      }
    })
  }
  /**
   * 查询主办单位下拉接口
   */
  focusWorkSelectionList<T = any>(): Promise<AxiosResponse<T>> {
    return request({
      url: `${serviceName}/focus-work/selectionList`,
      method: 'get'
    })
  }
}
export default new keyWorkServe()
